package yangsw87.swing;

import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class Exercise extends JFrame {
	public Exercise() {
		setTitle("Contentpane 과 Jframe");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		GridLayout grid = new GridLayout(4,3);
		grid.setVgap(5);
						
		setLayout(grid);
		add(new JLabel("이름"));
		add(new JTextField(""));
		add(new JLabel(" 학번"));
		add(new JTextField(""));
		add(new JLabel(" 학과"));
		add(new JTextField(""));
		add(new JLabel(" 과목"));
		add(new JTextField(""));
	
		
		
		
		setSize(300,200);
		setVisible(true);
	}

	public static void main(String[] args) {
		new Exercise();
		
		
	}

}
